import ajax from './ajax';

/* export const BASE_URL = 'https://yaogeeks.dindong.cn/api/'; */
/* export var FILE_URL = 'http://rzkeji.oss-cn-shenzhen.aliyuncs.com/web/peoplesAssociation/'; */



//微信登录
export const wxAppLogin = (params,baseUrl) => ajax(baseUrl + 'auth/wxAppLogin', params,'POST')
//获取用户个人信息
export const getUserInfos = (params,baseUrl) => ajax(baseUrl+'ucenter/getUserInfo', params,'GET');
//绑定微信获取的手机号
export const directBindingPhone = (params,baseUrl) => ajax(baseUrl+'auth/directBindingPhone', params,'POST');
//获取微信绑定的手机号
export const getWeChatPhone = (params,baseUrl) => ajax(baseUrl+'auth/getWeChatPhone', params,'POST');

//添加购物车
export const addShopCart = (params,baseUrl) => ajax(baseUrl + 'mall/addShopCart', params,'POST')
//获取购物车列表
export const getShopCart = (params,baseUrl) => ajax(baseUrl + 'mall/getShopCart', params,'GET')
//删除购物车的商品
export const deleteShopCart = (params,baseUrl) => ajax(baseUrl + 'mall/deleteShopCart', params,'POST')

//获取轮播图
export const getBannerList = (params,baseUrl) => ajax(baseUrl + 'mall/getIndexBannerList', params,'GET')
//获取首页功能区按钮
export const getIndexButtonList = (params,baseUrl) => ajax(baseUrl + 'mall/getIndexButtonList', params,'GET')

//获取首页专区
export const getIndexAreaList = (params,baseUrl) => ajax(baseUrl + 'mall/getIndexAreaList', params,'GET')
//获取销售药品用的分类
export const getBuyingClassifyList = (params,baseUrl) => ajax(baseUrl + 'mall/getBuyingClassifyList', params,'GET')
//获取店铺的药品列表
export const getMerchantMedicineList = (params,baseUrl) => ajax(baseUrl + 'mall/getMerchantMedicineList', params,'GET')
//搜索药品
export const searchMedicine = (params,baseUrl) => ajax(baseUrl + 'mall/searchMedicine', params,'GET')
//获取用户的优惠券
export const getUserCoupon = (params,baseUrl) => ajax(baseUrl + 'ucenter/getUserCoupon', params,'GET')

//获取商品详情
export const getMedicineDetail = (params,baseUrl) => ajax(baseUrl + 'mall/getMedicineDetail', params,'GET')
//创建订单
export const buildOrder = (params,baseUrl) => ajax(baseUrl + 'mall/buildOrder', params,'POST')
//预览订单
export const submitOrder = (params,baseUrl) => ajax(baseUrl + 'mall/submitOrder', params,'POST')
//支付
export const weChatPayment = (params,baseUrl) => ajax(baseUrl + 'payment/weChatPayment', params,'POST')
//订单列表
export const getMyOrderList = (params,baseUrl) => ajax(baseUrl + 'order/getMyOrderList', params,'GET')
//订单详情
export const getMyOrderDetail = (params,baseUrl) => ajax(baseUrl + 'order/getMyOrderDetail', params,'GET')
//获取商家支持的收货方式
export const getMerchantSupportDeliveryMethod = (params,baseUrl) => ajax(baseUrl + 'mall/getMerchantSupportDeliveryMethod', params,'GET')

//删除收货地址
export const deleteShippingAddress = (params,baseUrl) => ajax(baseUrl + 'ucenter/deleteShippingAddress', params,'POST')
//获取我的收货地址
export const getShippingAddress = (params,baseUrl) => ajax(baseUrl + 'ucenter/getShippingAddress', params,'GET')
//新增收货地址
export const newShippingAddress = (params,baseUrl) => ajax(baseUrl + 'ucenter/newShippingAddress', params,'POST')
//获取关于我们
export const getAboutUs = (params,baseUrl) => ajax(baseUrl + 'ucenter/getAboutUs', params,'GET')

//获取店铺列表
export const getMerchantList = (params,baseUrl) => ajax(baseUrl + 'mall/getMerchantList', params,'GET')
//获取定位地址信息
export const getLocationInfos = (params,baseUrl) => ajax('https://apis.map.qq.com/ws/geocoder/v1/', params,'GET');

//取消订单
export const userCancelOrder = (params,baseUrl) => ajax(baseUrl + 'order/userCancelOrder', params,'POST')

//确认收货
export const confirmReceive = (params,baseUrl) => ajax(baseUrl + 'order/confirmReceive', params,'POST')

//优惠券列表
export const getCouponList = (params,baseUrl) => ajax(baseUrl + 'coupon/getCouponList', params,'GET')

//优惠券领取入口
export const couponReceive = (params,baseUrl) => ajax(baseUrl + 'coupon/couponReceive', params,'POST')

//获取虚拟购物车列表
export const getFictitiousShopCart = (params,baseUrl) => ajax(baseUrl + 'mall/getFictitiousShopCart', params,'GET')

//将虚拟购物车的商品放进真正购物车
export const helperShopCartChange = (params,baseUrl) => ajax(baseUrl + 'mall/helperShopCartChange', params,'POST')

//获取用户分销统计相关接口
export const getUserDistributionInfo = (params,baseUrl) => ajax(baseUrl + 'distribution/getUserDistributionInfo', params,'GET')
//用户申请提现接口
export const applyWithdrawal = (params,baseUrl) => ajax(baseUrl + 'distribution/applyWithdrawal', params,'POST')
//获取我的团队列表接口
export const getUserTeamsList = (params,baseUrl) => ajax(baseUrl + 'distribution/getUserTeamsList', params,'GET')
//获取分享海报图接口
export const getShareImg = (params,baseUrl) => ajax(baseUrl + 'distribution/getShareImg', params,'GET')